<script setup>
import { ref, reactive, computed, watch, watchEffect } from 'vue';

const countBase = ref(0);
const countOther = ref(1)
const count = computed(() => {
    return countBase.value + countOther.value
})
const add = () => {
    countBase.value++
}
const device = () => {
    countOther.value--
}

</script>

<template>
    <header>
        <h1>BaseLearn</h1>
    </header>
    <main>
        <section>
            <h4>demo练习</h4>
            <p>计数{{ count }}</p>
            <button @click="add">+</button>
            <button @click="device">-</button>
        </section>
    </main>

</template>

<style scoped></style>